package operation;

import Book.Book;
import Book.BookList;

public class Show implements IOperation{
    @Override
    public void work (BookList bookList) {
        System.out.println ("以下为所有图书:");

        int currentsize=bookList.getUsedSize ();
        for (int i = 0; i <currentsize ; i++) {
            Book book=bookList.getBooks (i);
            //sout默认调用ToString方法
            System.out.println (book);
        }
    }
}
